import request from '@/sheep/request';

export default {
    //出差申请列表
    getEvectionIndex: (params) =>
    request({
      url: 'api/evection/index',
      method: 'GET',
      custom: {
          showSuccess: false,
					successMsg: '',
					showError: true,
					errorMsg: '',
					showLoading: true,
					loadingMsg: '加载中',
					auth: true,
      },
      params,
    }),
    // 出差申请添加
    postEvectionAdd: (data) =>
    request({
      url: 'api/evection/add',
      method: 'POST',
      custom: {
          showSuccess: true,
					successMsg: '',
					showError: true,
					errorMsg: '',
					showLoading: false,
					loadingMsg: '加载中',
					auth: true,
      },
      data,
    }),
     // 出差申请详情
    getEvectionView: (params) =>
    request({
      url: 'api/evection/view',
      method: 'GET',
      custom: {
          showSuccess: false,
					successMsg: '',
					showError: true,
					errorMsg: '',
					showLoading: true,
					loadingMsg: '加载中',
					auth: true,
      },
      params,
    }),
    //获取组用户
    getUserByGroup: (params) =>
    request({
      url: 'api/user/getUserByGroup',
      method: 'GET',
      custom: {
          showSuccess: false,
					successMsg: '',
					showError: true,
					errorMsg: '',
					showLoading: false,
					loadingMsg: '加载中',
					auth: true,
      },
      params,
    }),
    //同意
    getEvectionApprovePass: (params) =>
    request({
      url: 'api/evection/pass',
      method: 'GET',
      custom: {
          showSuccess: true,
					successMsg: '',
					showError: true,
					errorMsg: '',
					showLoading: false,
					loadingMsg: '加载中',
					auth: true,
      },
      params,
    }),
    // 拒绝
    getEvectionApproveRefuse: (params) =>
    request({
      url: 'api/evection/refuse',
      method: 'GET',
      custom: {
          showSuccess: true,
					successMsg: '',
					showError: true,
					errorMsg: '',
					showLoading: false,
					loadingMsg: '加载中',
					auth: true,
      },
      params,
    }),
    	//出差审核列表
	getEvectionApproveList: (params) =>
    request({
        url: 'api/evection/approve_list',
        method: 'GET',
        params,
        custom: {
          showSuccess: false,
					successMsg: '',
					showError: true,
					errorMsg: '',
					showLoading: true,
					loadingMsg: '加载中',
					auth: true,
        },
    }),
}